package com.markus.basic.设计模式.抽象工厂模式;

/**
 * Author:markusZhang
 * Date:Create in 2020/8/30 11:10
 * todo:
 */
public class FactoryProducer {
    public static AbstractFactory getFactory(String factoryName){
        if ("phone".equalsIgnoreCase(factoryName)){
            return new PhoneFactory();
        }else if ("color".equalsIgnoreCase(factoryName)){
            return new ColorFactory();
        }
        return null;
    }
}
